package com.litian.dancechar.framework.common.base;

/**
 * 通用返回码对象(主要放各个模块的通用错误码)
 *
 * @author litian
 * @date 2021/6/21 21:25
 */
public enum RespResultCode implements IRespResultCode {
    /**
     * 成功
     */
    OK(0, "成功", "成功"),
    /**
     * 系统异常
     */
    SYS_EXCEPTION(-1, "系统异常", "系统异常");

    /**
     * 错误码
     */
    private Integer code;

    /**
     * 内部错误消息
     */
    private String message;

    /**
     * 给前台展示的错误消息
     */
    private String showMessage;

    RespResultCode(Integer code, String message, String showMessage) {
        this.code = code;
        this.message = message;
        this.showMessage = showMessage;
    }

    @Override
    public Integer getCode() {
        return code;
    }

    @Override
    public String getMessage() {
        return message;
    }

    @Override
    public String getShowMessage() {
        return showMessage;
    }
}